package com.glsc.ngateway.common.base.domain.oracle.ecology;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.util.List;


@Entity
@Table(name = "WORKFLOW_BILLFIELD", schema = "ECOLOGY_TARGET", catalog = "")
public class WorkflowBillfield {
    private Integer id;
    private Integer billid;
    private String fieldname;
    private Integer fieldlabel;
    private String fielddbtype;
    private String fieldhtmltype;
    private Integer type;
    private Integer viewtype;
    private String detailtable;
    private String fromuser;
    private Integer textheight;
    private Integer dsporder;
    private Integer childfieldid;
    private Integer imgheight;
    private Integer imgwidth;
    private Integer places;
    private String qfws;
    private String textheight2;
    private Integer selectitem;
    private Integer linkfield;
    private String selectitemtype;
    private Integer pubchoiceid;
    private Integer pubchilchoiceid;
    private Integer statelev;
    private String locatetype;

    private List<WorkflowSelectitem> workflowSelectitems;




    @Id
    @Column(name = "ID")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "BILLID")
    public Integer getBillid() {
        return billid;
    }

    public void setBillid(Integer billid) {
        this.billid = billid;
    }

    @Basic
    @Column(name = "FIELDNAME")
    public String getFieldname() {
        return fieldname;
    }

    public void setFieldname(String fieldname) {
        this.fieldname = fieldname;
    }

    @Basic
    @Column(name = "FIELDLABEL")
    public Integer getFieldlabel() {
        return fieldlabel;
    }

    public void setFieldlabel(Integer fieldlabel) {
        this.fieldlabel = fieldlabel;
    }

    @Basic
    @Column(name = "FIELDDBTYPE", nullable = true, length = 320)
    public String getFielddbtype() {
        return fielddbtype;
    }

    public void setFielddbtype(String fielddbtype) {
        this.fielddbtype = fielddbtype;
    }

    @Basic
    @Column(name = "FIELDHTMLTYPE", nullable = true, length = 1)
    public String getFieldhtmltype() {
        return fieldhtmltype;
    }

    public void setFieldhtmltype(String fieldhtmltype) {
        this.fieldhtmltype = fieldhtmltype;
    }

    @Basic
    @Column(name = "TYPE")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "VIEWTYPE")
    public Integer getViewtype() {
        return viewtype;
    }

    public void setViewtype(Integer viewtype) {
        this.viewtype = viewtype;
    }

    @Basic
    @Column(name = "DETAILTABLE", nullable = true, length = 400)
    public String getDetailtable() {
        return detailtable;
    }

    public void setDetailtable(String detailtable) {
        this.detailtable = detailtable;
    }

    @Basic
    @Column(name = "FROMUSER", nullable = true, length = 1)
    public String getFromuser() {
        return fromuser;
    }

    public void setFromuser(String fromuser) {
        this.fromuser = fromuser;
    }

    @Basic
    @Column(name = "TEXTHEIGHT", nullable = true, precision = 0)
    public Integer getTextheight() {
        return textheight;
    }

    public void setTextheight(Integer textheight) {
        this.textheight = textheight;
    }

    @Basic
    @Column(name = "DSPORDER")
    public Integer getDsporder() {
        return dsporder;
    }

    public void setDsporder(Integer dsporder) {
        this.dsporder = dsporder;
    }

    @Basic
    @Column(name = "CHILDFIELDID")
    public Integer getChildfieldid() {
        return childfieldid;
    }

    public void setChildfieldid(Integer childfieldid) {
        this.childfieldid = childfieldid;
    }

    @Basic
    @Column(name = "IMGHEIGHT")
    public Integer getImgheight() {
        return imgheight;
    }

    public void setImgheight(Integer imgheight) {
        this.imgheight = imgheight;
    }

    @Basic
    @Column(name = "IMGWIDTH")
    public Integer getImgwidth() {
        return imgwidth;
    }

    public void setImgwidth(Integer imgwidth) {
        this.imgwidth = imgwidth;
    }

    @Basic
    @Column(name = "PLACES")
    public Integer getPlaces() {
        return places;
    }

    public void setPlaces(Integer places) {
        this.places = places;
    }

    @Basic
    @Column(name = "QFWS", nullable = true, length = 400)
    public String getQfws() {
        return qfws;
    }

    public void setQfws(String qfws) {
        this.qfws = qfws;
    }

    @Basic
    @Column(name = "TEXTHEIGHT_2", nullable = true, length = 400)
    public String getTextheight2() {
        return textheight2;
    }

    public void setTextheight2(String textheight2) {
        this.textheight2 = textheight2;
    }

    @Basic
    @Column(name = "SELECTITEM")
    public Integer getSelectitem() {
        return selectitem;
    }

    public void setSelectitem(Integer selectitem) {
        this.selectitem = selectitem;
    }

    @Basic
    @Column(name = "LINKFIELD")
    public Integer getLinkfield() {
        return linkfield;
    }

    public void setLinkfield(Integer linkfield) {
        this.linkfield = linkfield;
    }

    @Basic
    @Column(name = "SELECTITEMTYPE", nullable = true, length = 1)
    public String getSelectitemtype() {
        return selectitemtype;
    }

    public void setSelectitemtype(String selectitemtype) {
        this.selectitemtype = selectitemtype;
    }

    @Basic
    @Column(name = "PUBCHOICEID")
    public Integer getPubchoiceid() {
        return pubchoiceid;
    }

    public void setPubchoiceid(Integer pubchoiceid) {
        this.pubchoiceid = pubchoiceid;
    }

    @Basic
    @Column(name = "PUBCHILCHOICEID")
    public Integer getPubchilchoiceid() {
        return pubchilchoiceid;
    }

    public void setPubchilchoiceid(Integer pubchilchoiceid) {
        this.pubchilchoiceid = pubchilchoiceid;
    }

    @Basic
    @Column(name = "STATELEV")
    public Integer getStatelev() {
        return statelev;
    }

    public void setStatelev(Integer statelev) {
        this.statelev = statelev;
    }

    @Basic
    @Column(name = "LOCATETYPE", nullable = true, length = 1)
    public String getLocatetype() {
        return locatetype;
    }

    public void setLocatetype(String locatetype) {
        this.locatetype = locatetype;
    }


    @OneToMany(fetch=FetchType.EAGER)
    @NotFound(action= NotFoundAction.IGNORE)
    @JoinColumn(name="FIELDID")
    public List<WorkflowSelectitem> getWorkflowSelectitems() {
        return workflowSelectitems;
    }

    public void setWorkflowSelectitems(List<WorkflowSelectitem> workflowSelectitems) {
        this.workflowSelectitems = workflowSelectitems;
    }

    @Override
    public String toString() {
        return "WorkflowBillfield{" +
                "id=" + id +
                ", billid=" + billid +
                ", fieldname='" + fieldname + '\'' +
                ", fieldlabel=" + fieldlabel +
                ", fielddbtype='" + fielddbtype + '\'' +
                ", fieldhtmltype='" + fieldhtmltype + '\'' +
                ", type=" + type +
                ", viewtype=" + viewtype +
                ", detailtable='" + detailtable + '\'' +
                ", fromuser='" + fromuser + '\'' +
                ", textheight=" + textheight +
                ", dsporder=" + dsporder +
                ", childfieldid=" + childfieldid +
                ", imgheight=" + imgheight +
                ", imgwidth=" + imgwidth +
                ", places=" + places +
                ", qfws='" + qfws + '\'' +
                ", textheight2='" + textheight2 + '\'' +
                ", selectitem=" + selectitem +
                ", linkfield=" + linkfield +
                ", selectitemtype='" + selectitemtype + '\'' +
                ", pubchoiceid=" + pubchoiceid +
                ", pubchilchoiceid=" + pubchilchoiceid +
                ", statelev=" + statelev +
                ", locatetype='" + locatetype + '\'' +
                '}';
    }
}
